-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add Modbus service for dynamic parameter reading #25908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Das ist grausig viel Logik. Warum muss der modbus Service etwas vin templates wissen? Die sollten ihm egal sein! Spannend ist allerdings die Modbus Config. Dafür hatte ich keine gute Idee :/ |
Die gehören in den Serviceaufruf. HA zeigt wie's geht: Die /cc @naltatis |
|
Ich bin einen Entwurf weiter, klappt soweit auch mit URL Parametern, ist übersichtlicher. Ein Update heute Abend! Problematisch ist die Parallelität der Browseranfragen und Wiederverwendung des Modbus-Plugins, theoretisch läuft es. Praktisch blockierte da gerade etwas, was einen weiteren echten Gerätetest braucht. Der aktuelle Ansatz ist unnötig aufwändig, läuft aber. |
|
Checks gerne ein, ich kann auch testen. |
jetzt aber... |
due to failed integration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added e2e tests, found a couple of bugs around how we handled modbus default values. This should all work fine now.
|
Your changes are working fine, thank you! |
iseeberg79
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
about the failing test, it's to decide how to handle empty strings?
|
currently I have no clue how to handle this per template using recently added battery-presets, but to remove those if a parameter uses service? |
|
@andig anything to add? or should we merge? |
|
Nice. Lets open another TODO for documenting the template author service somewhere? |
- add backend logic - remove frontend redundancy
Updated the |
|
Maybe #26726? |
My guess is, that this is a request that was triggered while typing Related info: In #26698 I'm switching from input based field updates (every keypress) to change based updates (on blur). The change in that PR is for other reasons, but will also eliminate these in-between checks. |
good catch. There is a short delay (500ms debounce) for the input field before the service is called for already "complete" parameter sets. Have seen it in the browsers development console for example on hostnames but never realized the error messages, yet |



This PR enables auto-filling of device parameters in the configuration UI by reading actual values from the device.
Adds HTTP service endpoint /api/modbus/params for reading device parameters based on template definitions without creating a full device instance.
Features (fixes #25857):
Usage examples:
recently updated to reduce to:
TODO: